package com.mall.business.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
        import com.mall.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.mall.business.mapper.TOrderPjMapper;
import com.mall.business.domain.TOrderPj;
import com.mall.business.service.ITOrderPjService;

/**
 * 订单评价Service业务层处理
 *
 * @author ruoyi
 * @date 2025-03-30
 */
@Service
public class TOrderPjServiceImpl extends ServiceImpl<TOrderPjMapper,TOrderPj>  implements ITOrderPjService
{
    @Autowired
    private TOrderPjMapper tOrderPjMapper;

    /**
     * 查询订单评价
     *
     * @param id 订单评价主键
     * @return 订单评价
     */
    @Override
    public TOrderPj selectTOrderPjById(String id)
    {
        return tOrderPjMapper.selectTOrderPjById(id);
    }

    /**
     * 查询订单评价列表
     *
     * @param tOrderPj 订单评价
     * @return 订单评价
     */
    @Override
    public List<TOrderPj> selectTOrderPjList(TOrderPj tOrderPj)
    {
        return tOrderPjMapper.selectTOrderPjList(tOrderPj);
    }

    /**
     * 新增订单评价
     *
     * @param tOrderPj 订单评价
     * @return 结果
     */
    @Override
    public int insertTOrderPj(TOrderPj tOrderPj)
    {
                tOrderPj.setCreateTime(DateUtils.getNowDate());
            return tOrderPjMapper.insertTOrderPj(tOrderPj);
    }

    /**
     * 修改订单评价
     *
     * @param tOrderPj 订单评价
     * @return 结果
     */
    @Override
    public int updateTOrderPj(TOrderPj tOrderPj)
    {
                tOrderPj.setUpdateTime(DateUtils.getNowDate());
        return tOrderPjMapper.updateTOrderPj(tOrderPj);
    }

    /**
     * 批量删除订单评价
     *
     * @param ids 需要删除的订单评价主键
     * @return 结果
     */
    @Override
    public int deleteTOrderPjByIds(String[] ids)
    {
        return tOrderPjMapper.deleteTOrderPjByIds(ids);
    }

    /**
     * 删除订单评价信息
     *
     * @param id 订单评价主键
     * @return 结果
     */
    @Override
    public int deleteTOrderPjById(String id)
    {
        return tOrderPjMapper.deleteTOrderPjById(id);
    }
}
